﻿using System;
using System.Collections.Generic;
using System.Text;
using OpenTK;

namespace Painter3D.RenderSys
{
    class CameraOrthographic : Camera
    {
        /// <summary>
        /// 构造一个正交摄像机
        /// </summary>
        /// <param name="width">宽度</param>
        /// <param name="height">高度</param>
        /// <param name="transform">相机吸附物体</param>
        /// <param name="nearPlane">近裁切平面距离</param>
        /// <param name="farPlane">远裁切平面距离</param>
        public CameraOrthographic(float width, float height, Transform transform, float nearPlane = 0.3f, float farPlane = 100f) : base(transform, width, height, nearPlane, farPlane)
        {

        }

        public override Matrix4 GetProjectMat()
        {
            return Matrix4.CreateOrthographic(width, height, nearPlane, farPlane); ;
        }
    }
}
